
public class PrimalityCandidate {
	protected long candidate;
	protected double accuracy;
	protected Boolean checked;
	protected Boolean primality;
	protected long stepCount;
	protected double resultAccuracy;

	public void setCandidate(long candidate) throws BadInputNumberException{
		if (candidate<2 || (candidate*candidate)<=candidate) throw new BadInputNumberException();
		this.candidate = candidate;
	}
	
	public void setAccuracy(double accuracy) throws BadInputNumberException{
		if (accuracy<=0 || accuracy>=1) throw new BadInputNumberException();
		this.accuracy = accuracy;
	}
	
	public PrimalityCandidate(long candidate, double accuracy) throws BadInputNumberException
	{
		if (candidate<2 || (candidate*candidate)<=candidate || accuracy<=0 || accuracy>=1) throw new BadInputNumberException();
		this.candidate = candidate;
		this.accuracy = accuracy;
		checked = false;
		primality = false;
		stepCount = 0;
		resultAccuracy = 0;
	}
	
	public class BadInputNumberException extends Exception {
		private static final long serialVersionUID = -1536606516697419351L;
	}

	public long getStepCount() {
		return stepCount;
	}

}
